package edu.sias.hyzn.vo;

import lombok.Data;

import java.time.LocalDateTime;
import java.util.Map;

@Data
public class EyeAnalysisResult {
    private String idCardNumber; // 病历号
    private String name; // 患者姓名
    private String gender; // 性别
    private Integer age; // 年龄
    private String remark; // 备注
    private String liveCity; // 居住城市
    private String doctor; // 医生姓名
    private Long visitId;// 就诊记录 ID
    private LocalDateTime visitDateTime;// 就诊时间
    private String leftImgUrl; // 左眼图片 URL
    private String rightImgUrl; // 右眼图片 URL
    private String analysisResult; // 诊断结果（多个疾病）
    private Map<String, Double> predictions; // 各疾病的预测概率

    public EyeAnalysisResult() {
        this.idCardNumber = "";
        this.name = "";
        this.gender = "";
        this.age = 0;
        this.remark = "";
        this.liveCity = "";
        this.doctor = "";
        this.leftImgUrl = "";
        this.rightImgUrl = "";
        this.analysisResult = "";
        this.predictions = null;
    }

    public EyeAnalysisResult(String doctor, Long visitId, String leftImgUrl, String rightImgUrl, String analysisResult, Map<String, Double> predictions) {
        this.idCardNumber = "";
        this.name = "";
        this.gender = "";
        this.age = 0;
        this.remark = "";
        this.liveCity = "";
        this.doctor = doctor;
        this.visitId = visitId;
        this.visitDateTime = LocalDateTime.now();
        this.leftImgUrl = leftImgUrl;
        this.rightImgUrl = rightImgUrl;
        this.analysisResult = analysisResult;
        this.predictions = predictions;
    }

    public EyeAnalysisResult(
            String idCardNumber, String name, String gender, Integer age, String remark,
            String liveCity, String doctor, Long visitId, LocalDateTime visitDateTime, String leftImgUrl, String rightImgUrl,
            String analysisResult, Map<String, Double> predictions
    ) {
        this.idCardNumber = idCardNumber;
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.remark = remark;
        this.liveCity = liveCity;
        this.doctor = doctor;
        this.visitId = visitId;
        this.visitDateTime = visitDateTime;
        this.leftImgUrl = leftImgUrl;
        this.rightImgUrl = rightImgUrl;
        this.analysisResult = analysisResult;
        this.predictions = predictions;
    }
}
